﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DigitalImage.softLib.stages {
    class CCTBthreshold:IColorToBinary {
        private int threshold;
        
        public CCTBthreshold(int threshold) {
            this.threshold = threshold;
        }

        public byte[,] transform(System.Drawing.Bitmap inputImage) {
            byte[,] slika = CImageUtil.bitmapToByteMatrix(inputImage);

            return CImageUtil.matrixToBinary(slika, (byte)threshold);
        }
    }
}
